package com.construction.engineering.accounting.common.result;

import lombok.Data;

/**
 * @author liangyushijiu
 */
@Data
public class BaseResult<T> {

    /**
     * 响应业务状态
     */
    private String code;

    /**
     * 响应消息
     */
    private String msg;

    /**
     * 响应中的数据
     */
    private T data;


    public BaseResult(T data) {
        this.code = "200";
        this.msg = "success";
        this.data = data;
    }

    public BaseResult(String code, T data) {
        this.code = code;
        this.msg = "success";
        this.data = data;
    }

    public BaseResult(String code, String msg, T data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public BaseResult(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

}
